home *** CD-ROM | disk | FTP | other *** search
- #!/usr/bin/perl
- #
- # USAGE : renice.pl <nice> <pid>
-
- #($tmppath = $ARGV[0]) =~ s/(\&|'|")/\\\1/g; # escape &, ' and " chars with \
-
- $nice = $ARGV[0];
- $pid = $ARGV[1];
-
- open SHELL2, "renice $nice $pid |" or die "probleme";
-
- # STDOUT: 759: old priority 0, new priority 1
- # ou
- # STDERR: renice: 759: setpriority: Permission denied
- #
-
- if(/.+ new priority (.+$)/)
- {
- $newnice = $1;
- }
-
- close SHELL2;
-
- print $newnice;